function validateEmpty(fld) {
    var error = "";

    if (fld.value.length == 0) {
        fld.style.background = '#99ccff';
        error = "El campo "+fld.name+" no ha sido llenado.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;
}

 function acceptNum(evt,nav4,opt)
 {
   var key = nav4 ? evt.which : evt.keyCode;
   if (opt == 1) return (key == 13 || key == 47 || (key >= 48 && key <= 57) || (key == 8) || (key == 9) || (key == 11));
   else return (key == 13 || key == 46 || (key >= 48 && key <= 57) || (key == 8) || (key == 9) || (key == 11));
 }

function validaAcceso(theForm){
	var reason = "";

	reason += validateEmpty(theForm.cedula);
	reason += validateEmpty(theForm.clave);

	if (reason != "") {
		alert("Algunos campos necesitan correcion:\n" + reason);
    	return false;
  	}

}
